//引入pinia
import { defineStore } from "pinia";
//设置并暴露出去数据对象

export const useCountStore=defineStore(
    'count',
    {
        //动作方法复用
        actions:{
            onChange(param:any) {
                this.sum = param;
            }
        },
        state() {
            return {
                sum:6,
                name:'张三'
            }
        },
        //计算
        getters:{}
    }
)